package cn.xuan.zp.web.preload;


import cn.xuan.zp.service.log.aop.LogAopAction;
import cn.xuan.zp.service.log.bo.IBusinessLogger;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class PreloadServlet extends HttpServlet {
    @Override
    public void init() throws ServletException {
        super.init();
        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
//        IBusinessLogger business = (IBusinessLogger) wac.getBean("business");
//        LogAopAction.setBusiness(business);
        /*DictionaryService dictionaryService = (DictionaryService) wac.getBean("dictionaryService");
        try {
            List<OsepDictionary> osepDictionaries = dictionaryService.queryByTableNameAndAttr("OSEP_WEIGHTINFO", "REASON");
            Cache.MP_REASON.addAll(osepDictionaries); // 预加载审核原因
        } catch (Exception e) {
            e.printStackTrace();
        }*/
    }
}
